#!/usr/bin/python

class paullist(list):
    def __init__(self, data):
        list.__init__(self, data)

    def normalize(self):
        list.__init__(self, self.__recurseSub(self))

    def __recurseSub(self, dataList):
        returnList = []
        for thing in dataList:
            if type(thing) == list:
                returnList.extend(self.__recurseSub(thing))
            else:
                returnList.append(thing)
        return returnList

if __name__ == '__main__':
    p = paullist([1,2,3,[1,2]])
    print p
    p.normalize()
    print p
